<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Only & V.C.</title>
  <link rel="shortcut icon" href="/theme/images/favicon.ico"></link>
  <link rel="stylesheet" type="text/css" href="/theme/style/index.css"></link>
</head>
<body>
  {% for blog in blogs %}
    {% ifequal blog.author.nickname "fanweixiao" %}
      <strong style="color:#006E2E;">{{ blog.author.nickname }}</strong> writes on {{ blog.date.date }}
    {% endifequal %}
    {% ifequal blog.author.nickname "weiyixie"  %}
      <strong style="color:#CC0000;">{{ blog.author.nickname }}</strong> writes on {{ blog.date.date }}
	{% endifequal %}
	{% ifequal blog.author.nickname "hongxiaojun" %}
      <strong style="color:#4096EE;">{{ blog.author.nickname }}</strong> writes on {{ blog.date.date }}
    {% endifequal %}
	{% ifequal blog.author.nickname "hanfeiz" %}
      <strong style="color:#73880A;">{{ blog.author.nickname }}</strong> writes on {{ blog.date.date }}
    {% endifequal %}
    <br /><i>{{ blog.content|escape }}</i><br /><br />
  {% endfor %}
  <div style="margin-top:10px;"></div>
  {% if haveWriteRights %}
    <form action="/writeblog" method="post">
      <div><textarea name="content" rows="5" cols="60"></textarea></div>
      <div><input type="submit" value="write" /></div>
    </form><br /><br />
  {% else %}
    {% if usr %}
      You don't have permission to write anything, 
    {% else %}
      <a href="{{ loginUrl }}">Login to write something</a><br />
    {% endif %}
  {% endif %}
  {% if usr %}
    <a href="{{ logoutUrl }}">Logout</a>
  {% endif %}
  <div id="jinfo"></div>
</body>
</html>
